const path=require("path")

//引用模块
const {VueLoaderPlugin}= require("vue-loader")

module.exports={
    entry:path.join(__dirname,"./src/main.js"),
    output:{
        publicPath:'/dist',
        path:path.join(__dirname,"/dist"),
        filename:"mundel.js"
    },
    module:{
        rules:[
            {test:/\.vue$/,loader:"vue-loader"},
            {test:/\.css$/,use:['style-loader','css-loader']},
            {test: /\.sass$/, loaders: ['style', 'css', 'sass']},
            {test:/\.(jpg|png|gif|jpeg|bmp|dxf)$/,use:'url-loader'},
            {test:/\.(ttf|eot|svg|woff|woff2|otf)$/,use:'url-loader'}
        ]
    },
    resolve:{
        alias:{
            //"vue$":"vue/dist/vue.js"
        }
    },
    plugins:[
        new VueLoaderPlugin()
     ]
}